var env = true;//false发布跨域环境，true表示非跨域环境
var HOST = env ? 'http://www.loushengyue.com/lgz' : '..';

jump();


function jump() {
    $(".search i").tap(function () {
        window.location.href = './proSearch.html';
    });
    $(".retreat i").tap(function () {
        window.history.back();
    });
}

function request(option) {
    var def = $.Deferred();
    if (!option || !option.url) {
        throw Error('url is undefined.');
    }
    var _config = {
        type: 'get',
        dataType: 'json',
        success: function (res) {
            def.resolve(res);
        },
        error: function (a, b, err) {
            def.reject(err);
        }
    };
    $.extend(_config, option, true);
    $.ajax(_config);
    return def.promise();
}

function checkLoginStatus() {
    var loginUser = LsyCookie.getItem('loginUserName');
    if (!loginUser) {
        window.location.href = './login.html';
    }
}
